<script>
  import Vue from 'vue';


  export default {

    beforeCreate(){
      Vue.component('global-todo-item', {
        template: '<view>这是个待办项</view>'
      })
    },
    created() {
      // 调用API从本地缓存中获取数据
      const logs = wx.getStorageSync("logs") || [];
      logs.unshift(Date.now());
      wx.setStorageSync("logs", logs);

      console.log("app created and cache logs by setStorageSync");
    }
  };


</script>

<style>
  .container {
    height: 80%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    padding: 200rpx 0;
    box-sizing: border-box;
  }

  /* this rule will be remove */
  * {
    transition: width 2s;
    -moz-transition: width 2s;
    -webkit-transition: width 2s;
    -o-transition: width 2s;
  }
</style>
